package com.freejava.testmutildatasource.dao.master;

import com.freejava.testmutildatasource.entity.MySinger;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface MySingerDao {

    @Delete("delete from t_singer where id = #{id}")
    int deleteByPrimaryKey(Integer id);

    int insert(MySinger singer);


//    int insertSelective(MySinger record);

    @Select("select * from t_singer where id = #{id}")
    MySinger selectByPrimaryKey(Integer id);

//    int updateByPrimaryKeySelective(MySinger record);

//    int updateByPrimaryKey(MySinger record);

    @Select("select * from t_singer where name = #{name}")
    MySinger findByName(@Param("name") String name);
}
